package com.peas.platform.module.icims.budget.project.adapter.repository.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.framework.mybatisplus.po.BasePo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;
import javax.validation.constraints.*;

// 二级项目申报绩效指标
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`tbl_budget_project_two_kpi`")
public class BudgetProjectTwoKpiPo extends BasePo {

    // 二级项目申报表ID
    // （二级项目申报表）外键
    @Comment(value = "二级项目申报表ID")
    @TableField(value = "`project_two_id`", jdbcType = JdbcType.BIGINT)
    private Long projectTwoId;

    // 绩效目标分类
    // 0总目标，1本年度绩效目标
    @Comment(value = "绩效目标分类")
    @Size(max = 4, message = "绩效目标分类不能超过4个字符")
    @TableField(value = "`performance_type`", jdbcType = JdbcType.VARCHAR)
    private String performanceType;

    // 指标等级
    @Comment(value = "指标等级")
    @TableField(value = "`level`", jdbcType = JdbcType.INTEGER)
    private Integer level;

    // 指标编码
    @Comment(value = "指标编码")
    @Size(max = 200, message = "指标编码不能超过200个字符")
    @TableField(value = "`kpi_code`", jdbcType = JdbcType.VARCHAR)
    private String kpiCode;

    // 指标名称
    @Comment(value = "指标名称")
    @Size(max = 200, message = "指标名称不能超过200个字符")
    @TableField(value = "`kpi_name`", jdbcType = JdbcType.VARCHAR)
    private String kpiName;

    // 指标内容
    // 手动输入
    @Comment(value = "指标内容")
    @Size(max = 200, message = "指标内容不能超过200个字符")
    @TableField(value = "`kpi_content`", jdbcType = JdbcType.VARCHAR)
    private String kpiContent;

    // 指标值
    // 手动输入
    @Comment(value = "指标值")
    @Size(max = 200, message = "指标值不能超过200个字符")
    @TableField(value = "`kpi_value`", jdbcType = JdbcType.VARCHAR)
    private String kpiValue;

    // 周期指标值
    @Comment(value = "周期指标值")
    @Size(max = 200, message = "周期指标值不能超过200个字符")
    @TableField(value = "`kpi_value_period`", jdbcType = JdbcType.VARCHAR)
    private String kpiValuePeriod;

    // 备注
    // 手动输入
    @Comment(value = "备注")
    @Size(max = 200, message = "备注不能超过200个字符")
    @TableField(value = "`remark`", jdbcType = JdbcType.VARCHAR)
    private String remark;

    // 排序权重
    // 倒序排序
    @Comment(value = "排序权重")
    @TableField(value = "`weight`", jdbcType = JdbcType.INTEGER)
    private Integer weight;

    // 上级指标ID
    // （二级项目绩效指标表）外键
    @Comment(value = "上级指标ID")
    @TableField(value = "`parent_id`", jdbcType = JdbcType.BIGINT)
    private Long parentId;

}
